if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[InsertChangeDataRecord__{tableIdentifier}]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[InsertChangeDataRecord__{tableIdentifier}]

exec('
CREATE PROCEDURE dbo.[InsertChangeDataRecord__{tableIdentifier}]
	@ChangeTransactionId BigInt,
	@SourceRowId BigInt,
	@SourceColumnId Int,
	@SourceFieldValue sql_variant
AS

	INSERT INTO dbo.[ChangedData__{tableIdentifier}]
           ([ChangeTransactionId]
           ,[SourceRowId]
           ,[SourceColumnId]
           ,[SourceFieldValue])
     VALUES
           (@ChangeTransactionId,
			@SourceRowId,
			@SourceColumnId,
			@SourceFieldValue)
')